package com.ryan.mdp.exception;

import java.util.Locale;

import org.springframework.context.support.ResourceBundleMessageSource;

public class MdpMessages {

    public static ResourceBundleMessageSource messageSource = new ResourceBundleMessageSource();

    static {
        messageSource.setBasename("com/bill99/mdp/exception/errors");
    }

    public static String getMessage(String code, Object... args) {
        return messageSource.getMessage(code, args, Locale.getDefault());
    }
}
